home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / 1994.11.gz / 1994.11 / 000153_edp@it.ntu.edu.au_Tue Nov 29 01:55:17 1994.msg < prev    next >
Internet Message Format  |  1994-11-30  |  4KB

  1. Received: from morinda (morinda.cs.ntu.edu.au) by cs.umb.edu with SMTP id AA09424
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Mon, 28 Nov 1994 01:55:28 -0500
  3. Received: (from edp@localhost) by morinda (8.6.8.1/8.6.6) id QAA08915 for tex-k@cs.umb.edu; Mon, 28 Nov 1994 16:25:17 +0930
  4. From: Euan Pryde <edp@it.ntu.edu.au>
  5. Message-Id: <199411280655.QAA08915@morinda>
  6. Subject: nested macros
  7. To: tex-k@cs.umb.edu
  8. Date: Mon, 28 Nov 1994 16:25:17 +0930 (CST)
  9. X-Mailer: ELM [version 2.4 PL23]
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. Content-Length: 2950      
  14.  
  15. Hello,
  16.  
  17. We have just recently installed the latest Unix TeX distribition,
  18. now some of our old documents won't compile anymore.
  19.  
  20. Latex documents with nested macros don't work anymore.
  21. ie.
  22. \caption{A sample table taken from \protect{\cite{lamp:latex}}}
  23.  
  24. generates the following message:
  25.  
  26. ! Argument of \@caption has an extra }.
  27. <inserted text>
  28.                 \par
  29. l.2047 ... taken from \protect{\cite{lamp:latex}}}
  30.  
  31. Needless to say this type of thing has caused a lot of problems for
  32. our postgraduate students trying to produce their theses.
  33.  
  34. Is this an improvement in latex2e over latex2.09 or a bug?
  35.  
  36. I have included a more detailed description from one of our users :
  37.  
  38. > In order to produce vector symbols (ie, letters with an
  39. > underline character of tilde) I've been using the following
  40. > macro:
  41. >   % How to draw vectors: from ``A {\tt plain} \TeX \ Primer''
  42. >   % by Malcolm Clark, p358, exercise 23.3.
  43. >   % The solution's in the back!
  44. >   \def\ut#1{\mathchoice
  45. >   %displaystyle
  46. >     {\vtop{\offinterlineskip\halign{##\crcr
  47. >     $\hfil\displaystyle{#1}\hfil$\cr
  48. >     \noalign{\vskip1pt}
  49. >     $\hfil\displaystyle\char'176\hfil$\cr}}}
  50. >   %textstyle
  51. >     {\smash
  52. >     {\vtop{\offinterlineskip\halign{##\crcr
  53. >     $\hfil\textstyle{#1}\hfil$\cr
  54. >     \noalign{\vskip1pt}
  55. >     $\hfil\textstyle\char'176\hfil$\cr}}}
  56. >     {\textstyle\vphantom{#1}}}
  57. >   %scriptstyle
  58. >     {\vtop{\offinterlineskip\halign{##\crcr
  59. >     $\hfil\scriptstyle{#1}\hfil$\cr
  60. >     \noalign{\vskip0.7pt}
  61. >     $\scriptstyle\hfil\char'176\hfil$\cr}}}
  62. >   %scriptscriptstyle
  63. >     {\vtop{\offinterlineskip\halign{##\crcr
  64. >     $\hfil\scriptscriptstyle{#1}\hfil$\cr
  65. >     \noalign{\vskip0.5pt}
  66. >     $\scriptscriptstyle\hfil\char'176\hfil$\cr}}}}
  67. > This works fine, in general. However, within captions of
  68. > figures & tables, it (sometimes) has to be protected,
  69. > as shown:
  70. >   .
  71. >   .
  72. >   .
  73. >   \caption{Some $[m;\protect{\ut{s}};c]$-systems.}
  74. >   \label{fig:1}
  75. >   \end{figure}
  76. > Once this was done, vectors gave no problems with \LaTeX 2.09.
  77. > However, running \LaTeX 2e over the identical source file
  78. > gives the error:
  79. >   ! Illegal parameter number in definition of \@tempa.
  80. >   <to be read again> 
  81. >                    \crcr 
  82. >   l.413 ...n{Some $[m;\protect{\ut{s}};c]$-systems.}
  83. >                                                   
  84. >   ? 
  85. > Various modifications were tried -- to no avail.
  86. > The kludge adopted to circumvent this problem is to typeset 
  87. > the required formula into a box, external to the figure, 
  88. > and then to copy the box's contents into the \caption line. 
  89.  
  90.  -- 
  91.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92.  Euan Pryde                /
  93.  System Administrator              / Well thats what the sign on the 
  94.  School of Information Technology    / door says anyway
  95.  Northern Territory University        /
  96.      edp@it.ntu.edu.au        /
  97.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~